<script setup>
import NavBar from '../components/NavBar.vue'
import Footer from '../components/Footer.vue';
import LoginModal from "../components/LoginModal.vue";
import {useUserStore} from "../store/user.ts";
import AIChat from "../components/AIChat.vue";
const userStore = useUserStore();

const token = localStorage.getItem("token");

if (token) {
  userStore.getInfo();
}
// const visible = ref(true);
// const attr = ref([])
// const inputValue = ref([]);
// const attrValue = ref('')
// const handleAddAttr = () => {
//   attr.value.push({'akName' : attrValue, 'values': []})
//   inputValue.value.push('')
// }
// const handleClose = (item, tag) => {
//     item.values.splice(item.values.indexOf(tag), 1)
// }



</script>


<template>
    <LoginModal />
    <NavBar />
    <AIChat />
    <main>
        <div class="w-full bg-[#f7f8f8]">
            <slot></slot>
        </div>
    </main>
    <Footer> </Footer>
</template>